
#include <stdatomic.h>
#include <stdio.h>
#include <conio.h>
#include "tinycthread.h"
#include "snake.h"


game MyGame;

int main(){
    GameInit(&MyGame);
    thrd_t direct_ctrl,info_refresh;
    thrd_create(&direct_ctrl,GameSteer,&MyGame);
    thrd_create(&info_refresh,FreshGameInfo,&MyGame);
    GameRun(&MyGame);
    GameStop(&MyGame);
    thrd_detach(direct_ctrl);
    thrd_detach(info_refresh);
    return(0);
}


